#ifndef _Key_H
#define _Key_H

#include "systick.h"
#include "system.h"

#define Key_PORT  GPIOA
#define Key1_PIN 	GPIO_Pin_15
#define Key2_PIN 	GPIO_Pin_14
#define Key3_PIN 	GPIO_Pin_13
#define Key4_PIN 	GPIO_Pin_12

#define Key_PORT_RCC  RCC_APB2Periph_GPIOA
#define Key1 PAin(15)
#define Key2 PAin(14)
#define Key3 PAin(13)
#define Key4 PAin(12)

#define Key1_press 1
#define Key2_press 2
#define Key3_press 3
#define Key4_press 4

void Key_init();
u8 Key_scan(u8 mode);

#endif